const getMessage = require('./chatApi')


const io = require('socket.io')({
  cors: {
    origin: '*',
    allowedHeaders: ["my-custom-header"],
    credentials: true,
  },
  serveClient:false
})

io.sockets.on('connection',socket => {
  console.log(socket.id);
  getMessage(socket)

})


module.exports = io